<!--
  Copyright 2020 The Chromium Authors. All rights reserved.
  Use of this source code is governed by a BSD-style license that can be
  found in the LICENSE file.
-->
<script>
async function go() {
  const importObj = {
    env: {
      memory: new WebAssembly.Memory({
        initial: 1,
        maximum: 1,
      }),
      __memory_base: 1024,
      table: new WebAssembly.Table({
        initial: 2,
        maximum: 2,
        element: 'anyfunc',
      }),
      debugger: () => {
        debugger;
      },
    },
  };

  const instance = await WebAssembly.instantiateStreaming(fetch('unreachable.wasm'), importObj);
  instance.instance.exports.Main();
}

go();
</script>
